package stream;

import java.util.stream.Stream;

public class StreamCount {
    public static void main(String[] args) {
        Stream<String> stream= Stream.of("aa","bb","cc");
        Stream<String> stream2= Stream.of("aa","bb","cc");

        //方法是函数拼接，里面sout方法不执行，需要调用终结方法。
       stream.filter(s -> {
            System.out.println(s);
            return true;
        }).count();
stream2.count();
    }
}

